-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fixes the rendering logic inside the environment classes #515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
source/extensions/omni.isaac.lab/omni/isaac/lab/sim/simulation_context.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/sim/simulation_context.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/sim/simulation_context.py
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/sim/simulation_context.py
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/sim/simulation_context.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env.py
Outdated
Show resolved
Hide resolved
…ased_env.py Co-authored-by: Mayank Mittal <[email protected]> Signed-off-by: David Hoeller <[email protected]>
Co-authored-by: Mayank Mittal <[email protected]> Signed-off-by: David Hoeller <[email protected]>
Co-authored-by: Mayank Mittal <[email protected]> Signed-off-by: David Hoeller <[email protected]>
Co-authored-by: Mayank Mittal <[email protected]> Signed-off-by: David Hoeller <[email protected]>
Possible BugI noticed some weird behaviours using the I just made the upgrade from Orbit (and Isaac Sim 2023.1.1) to IsaacLab (and Isaac Sim 4.0) this week, so I still may be doing something wrong, but this feature was definitely not working as intended. Possible FixAfter looking to the commits, I saw a change in the logic. Previously I noticed that even though these two approach should be equivalent, the simulation did not behave the same. In one case the robot would be able to walk, in the other not. In order to fix the behaviour, I had to change the operation flow from : for _ in range(self.cfg.decimation):
self._sim_step_counter += 1
# set actions into buffers
self.action_manager.apply_action()
# set actions into simulator
self.scene.write_data_to_sim()
render = self._sim_step_counter % self.cfg.sim.render_interval == 0 and (
self.sim.has_gui() or self.sim.has_rtx_sensors()
)
# simulate
self.sim.step(render=render)
# update buffers at sim dt
self.scene.update(dt=self.physics_dt)to for _ in range(self.cfg.decimation):
self._sim_step_counter += 1
# set actions into buffers
self.action_manager.apply_action()
# set actions into simulator
self.scene.write_data_to_sim()
# simulate
self.sim.step(render=False)
# update buffers at sim dt
self.scene.update(dt=self.physics_dt)
# render
if self._sim_step_counter % self.cfg.sim.render_interval == 0 and (self.sim.has_gui() or self.sim.has_rtx_sensors()):
self.sim.render()This resolve the behaviour and my policy was able to walk perfectly no matter the I can't explain why the first approach is not working but it seems to me that I hope this help, and if I was doing something wrong, I'd be happy to be corrected if I made a mistake. |
|
@Batou1406 this is a great catch thanks a lot. |
Fixes isaac-sim#476 The parameter substeps in the Simulation config had no influence on the rendering frequency. Additionally, app.update was not properly called when initializing the stage due to the render method overload. This led to problems when modifying the render interval. - Merged physics stepping and rendering inside the step method in the simulation config. - Renamed substeps to render_interval in the simulation config. - Updated all the tasks ## Type of change - Breaking change (fix or feature that would cause existing functionality to not work as expected) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have run all the tests with `./isaaclab.sh --test` and they pass - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
Fixes isaac-sim#476 The parameter substeps in the Simulation config had no influence on the rendering frequency. Additionally, app.update was not properly called when initializing the stage due to the render method overload. This led to problems when modifying the render interval. - Merged physics stepping and rendering inside the step method in the simulation config. - Renamed substeps to render_interval in the simulation config. - Updated all the tasks ## Type of change - Breaking change (fix or feature that would cause existing functionality to not work as expected) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have run all the tests with `./isaaclab.sh --test` and they pass - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
# Description <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html --> Adds a cleanup of remaining async events in the Mimic data generation code. The cleanup cancels remaining events after the environment is closed and prior to sim app shutdown. This prevents left over events from trying to use the env after it is closed. ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task -->
# Description <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html --> Adds a cleanup of remaining async events in the Mimic data generation code. The cleanup cancels remaining events after the environment is closed and prior to sim app shutdown. This prevents left over events from trying to use the env after it is closed. ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task -->
# Description <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html --> Adds a cleanup of remaining async events in the Mimic data generation code. The cleanup cancels remaining events after the environment is closed and prior to sim app shutdown. This prevents left over events from trying to use the env after it is closed. ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task -->
Description
Fixes #476
The parameter substeps in the Simulation config had no influence on the rendering frequency.
Additionally, app.update was not properly called when initializing the stage due to the render method overload. This led to problems when modifying the render interval.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --format./isaaclab.sh --testand they passconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there